Skip to content

Conversation

@lucianopaz
Copy link
Member

@lucianopaz lucianopaz commented Aug 6, 2025

Description

This PR fixes the determination of independent_rvs RVs in vectorize_over_posterior. I think that the fixed check is much clearer now. It says that an rv is independent if it doesn't depend on an output, a needed_rv (a model freeRV that is replaced by its posterior samples), or another independent_rv. To make sure the check works correctly, the candidate rv nodes are searched in the order given by their topological sort.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc--7890.org.readthedocs.build/en/7890/

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.49%. Comparing base (85a234a) to head (6418107).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7890   +/-   ##
=======================================
  Coverage   91.49%   91.49%           
=======================================
  Files         116      116           
  Lines       18962    18963    +1     
=======================================
+ Hits        17349    17350    +1     
  Misses       1613     1613           
Files with missing lines Coverage Δ
pymc/sampling/forward.py 96.76% <100.00%> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lucianopaz lucianopaz requested a review from ricardoV94 August 6, 2025 09:49
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some small comments

@lucianopaz
Copy link
Member Author

Thanks for the review @ricardoV94. I applied your comments. Sorry for the long delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vectorize_over_posterior fails to determine independent_rvs

2 participants